import component from 'element-plus/es/components/tree-select/src/tree-select-option.mjs';
import path from 'path';
import { createRouter, createMemoryHistory } from 'vue-router'
const routes = [
    // {
    //     path: '/',
    //     name: 'add',
    //     component: () => import("@/pages/sysuser/add.vue")

    // },
    {
        path: '/',
        name: 'login',
        component: () => import("@/pages/login.vue")
    },
    {
        path: '/index',
        name: 'index',
        // redirect:'/doctor',
        component: () => import("@/pages/index.vue"),
        // redirect:'adddoctor',
        children: [{
            path: 'doctor',
            name: 'doctor',
            component: () => import("@/pages/doctor.vue"),
        },{
            path: 'hospital',
            name: 'hospital',
            component: () => import("@/pages/hospital.vue"),
        },{
            path: 'adddoctor',
            name: 'adddoctor',
            component: () => import("@/pages/adddoctor.vue"),
        },{
            path: 'patient',
            name: 'patient',
            component: () => import("@/pages/patient.vue"),
        },{
            path:'depinfo',
            name:'depinfo',
            component:()=>import("@/pages/depinfo/info.vue"),
        },{
            path:'search',
            name:'search',
            component:()=>import("@/pages/search.vue"),
        },{
            path: 'patientEduManage',
            name: 'patientEduManage',
            component: () => import("@/pages/patientEdu/patientEduManage.vue"),
        },{
            path: 'patienEduQuery',
            name: 'patienEduQuery',
            component: () => import("@/pages/patientEdu/patientEduQuery.vue"),
        },
        {
            path: 'addlist',
            name: 'addlist',
            component: () => import("@/pages/addlist.vue"),
        },
        {
            path: 'update/:id',
            name: 'update',
            component: () => import("@/pages/update.vue"),
        },
        {
            path: 'select/:id',
            name: 'select',
            component: () => import("@/pages/select.vue"),
        },{
            path: 'casted',
            name: 'casted',
            component: () => import("@/pages/casted.vue"),
        },{
            path: 'adddoctor',
            name: 'adddoctor',
            component: () => import("@/pages/adddoctor.vue"),
        }
    ]

    },
    

]
const router = createRouter({
    history: createMemoryHistory(),
    routes,
})
//导出
export default router;